package cn.txy.article.dao;

import cn.txy.article.domain.ArticleType;
import cn.txy.article.mongo.Comment;
import cn.txy.article.query.CommentQuery;
import com.github.pagehelper.Page;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.awt.print.Pageable;
import java.util.List;
@Repository
public interface CommentRepository extends MongoRepository<Comment,String> {
    List<Comment> findByArticleId(Long id);
    Page<Comment> findByArticleIdAndStateOrderByCreateTimeDesc(
            Long articleId,
            Integer state,
            Pageable pageable
    );
}
